﻿#include "Deck.h"
#include <algorithm>

#define ♥ s1
#define ♦ s2
#define ♣ s3
#define ♠ s4

using namespace std;

void InitDeck(deck &d)
{
	d.currentCardCount = 0;

	for(int i = 0; i < 52; i++)
	{
		int number = (i % 13) + 1;
		int symbol = (i % 4);

		d.currentCardCount++;
		InitCard(d.Cards[i], number, symbol);
	}
}

void RemoveCard(deck &d)
{
	for(int i = 1; i < d.currentCardCount; i++)
	{
		d.Cards[i - 1] = d.Cards[i];
	}
	d.currentCardCount--;
}

void ShuffleDeck(deck &d)
{
	random_shuffle (d.Cards, d.Cards + d.currentCardCount);
}